#!/usr/bin/python3.8.9
# -*- coding: utf-8 -*-

# @Author  : Tina Yu
# @Time    : 2021-7-21 22:27
from review.basic.lesson_11.survey import AnonymousServey

# 定义一个问题，并创建一个调查。
question = "你最喜欢的编程语言是什么？"
my_survey = AnonymousServey(question)

# 显示问题并存储答案
my_survey.show_question()
print("Enter 'q' at any time to quit.\n")

while True:
    response = input("Language:")
    if response == 'q':
        break
    else:
        my_survey.store_response(response)

# 显示最后的调查结果
print("本次的调查结果为：")
my_survey.show_results()
